import inspect


__author__ = 'yangxianming'

from common.KoufuConf import KoufuConf


class KoufuApi:
    __koufu_conf = KoufuConf()

    @staticmethod
    def __update_body(body, update_body="", del_body_key=""):
        if update_body != "":
            body.update(update_body)
        if del_body_key != "":
            if "," in del_body_key:
                for one_key in del_body_key.split(","):
                    del body[one_key]
            else:
                del body[del_body_key]
        return body

    #update_body:{}  del_body_key:key值 使用,分割多个值

    #首页口福场景查询（根据企业） action = koufu.corp.scene.list.query.corpId
    #http://api.ebuy.io/#/home/project/inside/api/detail?groupID=11&apiID=925&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_scene_list_query_corpId(self, update_body="", del_body_key=""):
        action = "koufu.corp.scene.list.query.corpId"
        default_body = {"requestId":1567060609104, "corpId":"dingf686af244fa39dcf35c2f4657eb6378f","token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #首页-商城-分类列表


    #电子合同签订
    #接口文档http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=690&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_electronic_contract_sign_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.electronic.contract.sign"
        default_body = {"requestId":1567060609104, "token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #查询当前最低提醒金额
    #接口文档：暂无维护
    def get_efuli_koufu_corp_config_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.config.query"
        default_body = {"requestId":1567060976595,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #设置余额不足提醒和最低提醒金额接口
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=592&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_config_manager_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.config.manager"
        default_body = {"requestId":1567059163289,"limitMoney":20000,
                        "token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #创建券类型餐规接口
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=688&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_meal_rule_rel_voucher_create_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.meal.rule.rel.voucher.create"
        default_body = {"requestId":1566920748976,"ruleType":"07","ruleName":"中秋福利123321","goodsId":10050087,
                        "goodsName":"【500】礼尚中秋积分卡","voucherAmount":1,"dingtalkUsers":"01145852441088302",
                        "dingtalkDepartments":"","sendDays":"20190927",
                        "token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #发放福利时确认员工列表
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=684&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_mealrule_user_distinct_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.mealrule.user.distinct"
        default_body = {"dingtalkDepartments":"","dingtalkUsers":"01145852441088302","requestId":1566920632635,"usersNum":1,
                        "token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #退出拼单
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=642&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_share_bill_quit_join_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.share.bill.quit.join"
        default_body = {"corpId":"dingf686af244fa39dcf35c2f4657eb6378f","month":"201908",
                        "requestId":1566871907547,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #口福当月对账单
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=685&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_meal_bill_file_pdf_send_month_data(self, update_body="", del_body_key=""):
        action = "efuli.meal.bill.file.pdf.send.month"
        default_body = {"corpId":"dingf686af244fa39dcf35c2f4657eb6378f","month":"201908",
                        "requestId":1566871907547,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业账单月账单
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=567&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_corp_account_record_search_new_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.account.record.search.new"
        default_body = {"yearMonth":"201908","requestId":1566876532828,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业账单的日账单
    #接口文档：http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=558&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_corp_account_record_day_search_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.account.record.day.search"
        default_body = {"pageNum":1,"pageSize":31,"yearMonth":"201908","requestId":1566871917801,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #当月日账单明细excel导出
    #接口文档：http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=683&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_meal_bill_file_send_day_data(self, update_body="", del_body_key=""):
        action = "efuli.meal.bill.file.send.day"
        default_body = {"corpId":"dingf686af244fa39dcf35c2f4657eb6378f","month":"201908","requestId":1566892532214,
                        "token": self.__koufu_conf.kk_token}
        return {"action": action,"body": self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}


    #查询企业发票信息
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=149&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_Enterprise_invoice_information_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.combo.order.invoice"
        default_body = {"pageNum":1,"pageSize":10,"requestId":1566803956951,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业开票配置信息保存
    #接口文档 http://api.ebuy.io/server/index.php?g=Web&c=Mock&o=simple&projectID=8&uri=http://api-location-url.com/api/koufu
    def get_efuli_koufu_corp_invoice_config_save_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.invoice.config.save"
        default_body = {"corpName":"小明有限公司","dutySign":"jshdhh213456789","invoiceEmail":"12345678912@163.com",
                        "type":"recharge","recharge_order_id": "" ,"requestId":1566806008869,
                        "token":self.__koufu_conf.kk_token}

        return {"action": action,"body": self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    # 发票开具
    # http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=64&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_invoice_send_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.invoice.send"
        default_body = {"corpName": "小明有限公司", "dutySign": "jshdhh213456789", "invoiceEmail": "12345678912@163.com",
                        "type": "recharge", "recharge_order_id": "", "requestId": 1566806008869,
                        "token": self.__koufu_conf.kk_token}

        return {"action": action,
                "body": self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}



    #==========================================这里是分割线=============================================================

    #套餐推荐列表
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=304&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_combo_recommend_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.combo.recommend.query"
        default_body = {"requestId":1562828038381,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业开票配置信息查询
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=108&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_invoice_config_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.invoice.config.query"
        default_body = {"requestId":1562828038381,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #查询可用券的最大面额
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=354&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_discount_voucher_usable_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.discount.voucher.usable"
        default_body = {"orderAmount":100000,"requestId":1562828038381,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #套餐查询
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=305&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_combo_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.combo.query"
        default_body = {"pageNum":1,"pageSize":50,"type":"","merchantNum":"","times":"","requestId":1562822957145,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业账户管理
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=42&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corpAccount_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corpAccount.query"
        default_body = {"corpId":self.__koufu_conf.corpId,"requestId":1562745540663,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #获取当前企业信息
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=35&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_info_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.info"
        default_body = {"requestId":1562745540663,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #场景查询
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=586&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_meal_scene_list_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.meal.scene.list.query"
        default_body = {"requestId":1562745540663,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业管理的信息加载
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=336&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_mealrule_query_combo_goods_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.mealrule.query.combo.goods"
        default_body = {"corpId":self.__koufu_conf.corpId,"requestId":1562745540663,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #按餐规查询门店列表
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=10&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_merchantshop_query_bymealrules_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.merchantshop.query.bymealrules"
        default_body = {"pageNum":1,"pageSize":10,"longitude":121.603865,"latitude":31.221974,"requestId":1562741435553,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #获取当前用户信息
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=34&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_info_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.info"
        default_body = {"requestId":1562563762084,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #拼单详情加载
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=312&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_share_bill_query_id_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.share.bill.query.id"
        default_body = {"code":"","corpId":self.__koufu_conf.corpId,"shareId":"","requestId":1562563762084,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #拼单历史记录
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=313&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_share_bill_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.share.bill.query"
        default_body = {"isOwner":"Y","pageNumber":1,"pageSize":10,"requestId":1562555380938,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #消费详情
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=575&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_consume_account_details_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.consume.account.details"
        default_body = {"requestId":1562316593288,"recordId":"","token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #现金券消费
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=301&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_userMeal_consume_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.userMeal.consume"
        default_body = {"corpId":self.__koufu_conf.corpId,"consumeMoney":"100","deductionMoney":"100","requestId":1562315497833,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #账户余额不限制时间
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=621&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_userMeal_all_voucherQuery_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.userMeal.all.voucherQuery"
        default_body = {"requestId":1562061410840,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #口福后管用户登陆
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=590&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_login_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.login"
        default_body = {"requestId":1562061410840,"loginName":"efuli","password":"efuli@2019"}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #餐规停用启用
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=7&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_mealrule_onoff_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.mealrule.onoff"
        default_body = {"mealRuleId":"","status":"02","requestId":1561605109426,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #餐规关联员工列表
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=608&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_meal_staff_rel_list_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.meal.staff.rel.list.query"
        default_body = {"corpId":self.__koufu_conf.corpId,"ruleType":"02","pageNum":1,"pageSize":1000,
                        "mealRuleId":"","userName":"","request_id":1561605109426,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #获取企业jsapi_ticket验签
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=30&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_config_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.config"
        default_body = {"url":"http://koufudev.e-fuli.com/index.html?corpid=dingf686af244fa39dcf35c2f4657eb6378f&version=PqpmgLP","requestId":1561453650444,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #判断用户是否已绑定支付宝
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=345&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_user_isbind_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.user.isbind"
        default_body = {"addressName":"","requestId":1561453650444,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #banner位信息查询
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=604&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_banner_configure_list_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.banner.configure.list"
        default_body = {"columnName":"01","requestId":1561453650444,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #统计用户id查询可用餐贴总金额及餐贴张数
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=38&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_userMeal_enable_voucherQuery_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.userMeal.enable.voucherQuery"
        default_body = {"requestId":1561453650444,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #获取首页信息
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=568&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_index_data_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.index.data"
        default_body = {"corpId":self.__koufu_conf.corpId, "requestId":1566876778161,"token":self.__koufu_conf.kk_token}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #餐补发放
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=494&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_mealrule_send_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.mealrule.send"
        default_body = {"requestId":1561358607466,"mealRuleId":"","token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #购买套餐页面当前套餐余额
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=552&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_combo_goods_list_balance_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.combo.goods.list.balance"
        default_body = {"requestId":1561358607466,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #用户加入拼单
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=310&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_share_bill_join_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.share.bill.join"
        default_body = {"shareId":"","code":"11","corpId":"dingf686af244fa39dcf35c2f4657eb6378f",
                        "dingUserId":"095959341421990556","requestId":1561358607466,"token":self.__koufu_conf.koufu_prod_token2}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #消费前拼单
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=315&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_before_share_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.before.share"
        default_body = {"shareId":"","amount":0,"totalMount":0,"ignore":"","requestId":1560757420634,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #员工创建拼单
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=311&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_share_bill_create_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.share.bill.create"
        default_body = {"requestId":1560491196543,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #账户明细
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=303&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_user_account_details_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.user.account.details"
        default_body = {"pageNum":1,"pageSize":10,"month":"201912","status":"","requestId":1560418039138,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #充值订单确认收款 /web/mng
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=147&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_account_order_confirm_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.account.order.confirm"
        default_body = {"requestId":1560411400476,"orderId":"","corpId":self.__koufu_conf.corpId}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #充值订单列表 /web/mng
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=146&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_account_order_list_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.account.order.list"
        default_body = {"requestId":1560411558169,"corpName":"","orderStatus":"","pageNum":1,"pageSize":30}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业充值账单提交订单申请
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=143&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_corp_account_order_apply_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.account.order.apply"
        default_body = {"marketPrice":100,"comboId":0,
                        "transferVoucher":"http://efulidev.oss-cn-hangzhou.aliyuncs.com/koufufile1560395841658.jpg?Expires=1875755843&OSSAccessKeyId=LTAIEMcpIL4BsY0e&Signature=UaWNFNbDRLkQ%2FcFQ%2FB33OnRjMp8%3D",
                        "requestId":1560395845048,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #创建或者修改餐规
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=6&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_mealrule_merge_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.mealrule.merge"
        default_body = {"ruleType":"00","autoSend":"Y","sendOutPunchCard":"Y","overtimePunchTime":"20:00","ruleName":"每日餐补","dingtalkUsers":"040351271326585810",
         "voucherPeriod":"2","sendDays":"WD","sendDaysDetail":"","voucherAmount":300,"useTimes":"00:00:00,23:59:00","ruleAddressTag":"测试",
         "ruleAddress":"银柳路","dingtalkUsercount":1,"cityId":"1234567","cityName":"上海市","mealRuleId":"e4c2fa5129e4414aabcbbb5b8880446f",
         "dingtalkDepartments":"0","ruleAddressLabel":"00","addressKeyword":"银柳路","rangeMeters":1000,"quantity":100,"status":"01","welfareSn":"",
         "latitude":31.221974,"longitude":121.60389,"shopArray":["ebeefc9c107844b5b5ff35b7eeec809b","6ed9a4b02927433ca2d43d1d68c9d9fb"],"requestId":1577432959632,
         "token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #按坐标查询附近商户
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=9&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_merchantshop_query_bycoordinates_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.merchantshop.query.bycoordinates"
        default_body = {"longitude":"121.603858","latitude":"31.221945","mealRuleId":"","pageNum":1,"pageSize":10,"range":1000,"requestId":1560491196543,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #企业餐规列表查询 口福前端/api/koufu
    #接口文档 http://api.ebuy.io/#/home/project/inside/api/detail?groupID=-1&apiID=8&projectName=%E5%8F%A3%E7%A6%8F&projectID=8
    def get_efuli_koufu_mealrule_query_data(self, update_body="", del_body_key=""):
        action = "efuli.koufu.mealrule.query"
        default_body = {"pageNum":1,"pageSize":20,"status":"01", "requestId":1560416851553,"token":self.__koufu_conf.koufu_prod_token1}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #-----------------------------------------------------------------口福后管接口---------------------------------------------------------------
    #efuli.koufu.corp.marketing.query
    def get_efuli_koufu_corp_marketing_create(self, update_body="", del_body_key=""):
        action = "efuli.koufu.corp.marketing.create"
        advGiftList = [{"rate":"0.3","goodsType":"01","goodsNum":"1",},{"rate":"0.3","goodsType":"01","goodsNum":"2.22",},{"rate":"0.4","goodsType":"01","goodsNum":"3.33",}]
        default_body = {"requestId":1592891583607,"giftType":"10","sn":"1991","picUrl":"","linkUrl":"","activityType":"01","giftValidTime":"24","validTime":"20200603","advGiftList":advGiftList}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #koufu.corp.scene.query.page
    def get_koufu_corp_scene_query_page(self, update_body="", del_body_key=""):
        action = "koufu.corp.scene.query.page"
        default_body = {"requestId":1592891583607,"pageSize":"10","pageNo":"1"}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #koufu.corp.scene.corp.list.query.page
    def get_koufu_corp_scene_corp_list_query_page(self, update_body="", del_body_key=""):
        action = "koufu.corp.scene.corp.list.query.page"
        default_body = {"requestId":1592891583607,"pageSize":"10","pageNo":"1","sceneId":""}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    #场景绑定企业 action = koufu.corp.scene.corp.bind
    def get_koufu_corp_scene_corp_bind(self, update_body="", del_body_key=""):
        action = "koufu.corp.scene.corp.bind"
        default_body = {"requestId":1592891583607,"corpId":"","sceneId":""}
        return {"action":action,"body":self.__update_body(body=default_body, update_body=update_body, del_body_key=del_body_key)}

    def get_funtion_name(self):
        api_list = []
        for one in dir(self):
            if "_data" in one and "get_" in one:
                api_list.append(one[4:-5].replace("_", "."))
        return api_list
